/**
 * <p>Copyright (c) 2011 深圳市鹏途信息技术有限公司 </p>
 * <p>				   All right reserved. 		     </p>
 *
 * <p>项目名称 ： 	东莞交通工程质量监督综合业务系统        </p>
 * <p>创建者   :	libitum
 *
 * <p>描   述  :   Convey.java for com.pengtu.entity.work    </p>
 *
 * <p>最后修改 : $: 2011-7-23-下午04:45:23 v 1.0.0	 libitum   $     </p>
 *
 */

package com.pengtu.entity.admin;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.Where;

import com.pengtu.entity.IdEntity;
import com.pengtu.entity.app.Attachment;

/**
 * 
 * Convey
 * 
 * 2011-7-23 下午04:45:23
 * 
 * @version 1.0.0
 * 
 */
@Entity
@Table(name = "T_APP_CONVEY")
public class Convey extends IdEntity {

	/**
	 * serialVersionUID:TODO
	 * 
	 * @since 1.0.0
	 */

	private static final long serialVersionUID = 1L;
	private String type; // 公文类型
	private String num; // 发文字号
	private String secret; // 密级程度
	private String crash; // 紧急程度
	private String keywords; // 主题词
	private String content; // 内容简介
	private String source; // 份数
	private String draft; // 拟稿人
	private String auditor; // 审查人
	private String auditIdea; // 审查意见
	private String verifier; // 复核人
	private String verifyIdea; // 复核意见
	private String signer; // 签发人
	private String remark; // 备注
	private String status; // 公文状态
	private String sentOrgName; // 发送单位
	private String takeOrgName; // 主送单位
	private String copyOrgName;// 抄送单位
	private String title; // 发文标题
	private String acctPetitionFile; // 附件
	private Date draftDate;// 拟稿日期
	private Date auditDate;// 审查日期
	private Date verifyDate;// 复核日期
	private String projectId;//工程
	private String flag;//判断是否行政,0行政，1是其他

	private Set<Attachment> attachmentSet =  new HashSet<Attachment>(0);

	private String taskId;// 任务ID,非持久化属性
	
	@Column(name = "TYPE")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Column(name = "NUM")
	public String getNum() {
		return num;
	}

	public void setNum(String num) {
		this.num = num;
	}

	@Column(name = "SECRET")
	public String getSecret() {
		return secret;
	}

	public void setSecret(String secret) {
		this.secret = secret;
	}

	@Column(name = "CRASH")
	public String getCrash() {
		return crash;
	}

	public void setCrash(String crash) {
		this.crash = crash;
	}

	@Column(name = "KEYWORDS")
	public String getKeywords() {
		return keywords;
	}

	public void setKeywords(String keywords) {
		this.keywords = keywords;
	}

	@Column(name = "CONTENT")
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "SOURCE")
	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	@Column(name = "DRAFT")
	public String getDraft() {
		return draft;
	}

	public void setDraft(String draft) {
		this.draft = draft;
	}

	@Column(name = "AUDITOR")
	public String getAuditor() {
		return auditor;
	}

	public void setAuditor(String auditor) {
		this.auditor = auditor;
	}

	@Column(name = "AUDITIDEA")
	public String getAuditIdea() {
		return auditIdea;
	}

	public void setAuditIdea(String auditIdea) {
		this.auditIdea = auditIdea;
	}

	@Column(name = "VERIFIER")
	public String getVerifier() {
		return verifier;
	}

	public void setVerifier(String verifier) {
		this.verifier = verifier;
	}

	@Column(name = "VERIFYIDEA")
	public String getVerifyIdea() {
		return verifyIdea;
	}

	public void setVerifyIdea(String verifyIdea) {
		this.verifyIdea = verifyIdea;
	}

	@Column(name = "SIGNER")
	public String getSigner() {
		return signer;
	}

	public void setSigner(String signer) {
		this.signer = signer;
	}

	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "STATUS")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Column(name = "SENTORGNAME")
	public String getSentOrgName() {
		return sentOrgName;
	}

	public void setSentOrgName(String sentOrgName) {
		this.sentOrgName = sentOrgName;
	}

	@Column(name = "TAKEORGNAME")
	public String getTakeOrgName() {
		return takeOrgName;
	}

	public void setTakeOrgName(String takeOrgName) {
		this.takeOrgName = takeOrgName;
	}

	/**
	 * copyOrgName
	 *
	 * @return  the copyOrgName
	 * @since   1.0.0
	 */
	@Column(name="COPYORGNAME")
	public String getCopyOrgName() {
		return copyOrgName;
	}

	/**
	 * @param copyOrgName the copyOrgName to set
	 */
	public void setCopyOrgName(String copyOrgName) {
		this.copyOrgName = copyOrgName;
	}

	@Column(name = "TITLE")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "DRAFTDATE")
	public Date getDraftDate() {
		return draftDate;
	}

	public void setDraftDate(Date draftDate) {
		this.draftDate = draftDate;
	}

	@Column(name = "AUDITDATE")
	public Date getAuditDate() {
		return auditDate;
	}

	public void setAuditDate(Date auditDate) {
		this.auditDate = auditDate;
	}

	@Column(name = "VERIFYDATE")
	public Date getVerifyDate() {
		return verifyDate;
	}

	public void setVerifyDate(Date verifyDate) {
		this.verifyDate = verifyDate;
	}

	@Column(name = "ACCTPETITIONFILE")
	public String getAcctPetitionFile() {
		return acctPetitionFile;
	}

	public void setAcctPetitionFile(String acctPetitionFile) {
		this.acctPetitionFile = acctPetitionFile;
	}

	/**
	 * projectId
	 *
	 * @return  the projectId
	 * @since   1.0.0
	 */
	@Column(name="PID")
	public String getProjectId() {
		return projectId;
	}

	/**
	 * @param projectId the projectId to set
	 */
	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}

	/**
	 * flag
	 *
	 * @return  the flag
	 * @since   1.0.0
	 */
	@Column(name="FLAG")
	public String getFlag() {
		return flag;
	}

	/**
	 * @param flag the flag to set
	 */
	public void setFlag(String flag) {
		this.flag = flag;
	}

	@OneToMany(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
	@JoinColumn(name = "TABLEID")
	@Where(clause=" DELFLAG = 0")
	public Set<Attachment> getAttachmentSet() {
		return attachmentSet;
	}

	public void setAttachmentSet(Set<Attachment> attachmentSet) {
		this.attachmentSet = attachmentSet;
	}

	@Transient
	public String getTaskId() {
		return taskId;
	}

	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}

}
